package nancal.mp.db.mongo.table

import java.io.*
import nbcp.base.db.*
import nbcp.base.comm.*
import nbcp.base.extend.*
import nbcp.base.enums.*
import nbcp.base.utils.*
import nbcp.myoql.db.*
import nbcp.myoql.db.comm.*
import nbcp.myoql.db.enums.*
import nbcp.myoql.db.mongo.*
import nbcp.myoql.db.mongo.base.*
import nbcp.myoql.db.mongo.component.*
import org.slf4j.LoggerFactory
import org.springframework.stereotype.*


/**
 * Git仓库
 */
@nbcp.base.db.annotation.Cn(value = """Git仓库""")
@org.springframework.data.mongodb.core.mapping.Document()
@nbcp.base.db.annotation.DbEntityGroup(value = """dev""")
@nbcp.base.db.annotation.DbEntityIndexes(value = arrayOf(nbcp.base.db.annotation.DbEntityIndex(value = arrayOf("""updateAt"""))))
class GitDataMeta(private val parentPropertyName: String): MongoColumnName() {
    constructor(value: MongoColumnName) : this(value.toString()) {}
    val id = mongoColumnJoin(this.parentPropertyName, "_id")
    val name = mongoColumnJoin(this.parentPropertyName, "name")
    /**
     * 集群
     */
    @nbcp.base.db.annotation.Cn(value = """集群""")
    val clusterCode = mongoColumnJoin(this.parentPropertyName, "clusterCode")
    /**
     * server
     */
    @nbcp.base.db.annotation.Cn(value = """server""")
    val server = IdNameUrlMeta(mongoColumnJoin(this.parentPropertyName, "server"))
    /**
     * accessToken
     */
    @nbcp.base.db.annotation.Cn(value = """accessToken""")
    val accessToken = mongoColumnJoin(this.parentPropertyName, "accessToken")
    /**
     * 语言
     */
    @nbcp.base.db.annotation.Cn(value = """语言""")
    val language = mongoColumnJoin(this.parentPropertyName, "language")
    /**
     * 开发语言的版本，如 1.8,11,17
     */
    @nbcp.base.db.annotation.Cn(value = """开发语言的版本，如 1.8,11,17""")
    val languageVersion = mongoColumnJoin(this.parentPropertyName, "languageVersion")
    /**
     * 是否是lib库
     */
    @nbcp.base.db.annotation.Cn(value = """是否是lib库""")
    val isLib = mongoColumnJoin(this.parentPropertyName, "isLib")
    /**
     * Git路径
     */
    @nbcp.base.db.annotation.Cn(value = """Git路径""")
    val path = mongoColumnJoin(this.parentPropertyName, "path")
    /**
     * 子文件夹
     */
    @nbcp.base.db.annotation.Cn(value = """子文件夹""")
    val folders = GitFolderDataMeta(mongoColumnJoin(this.parentPropertyName, "folders"))
    /**
     * 产品线
     */
    @nbcp.base.db.annotation.Cn(value = """产品线""")
    val productLine = IdCodeNameMeta(mongoColumnJoin(this.parentPropertyName, "productLine"))
    /**
     * 创建时间
     */
    @nbcp.base.db.annotation.Cn(value = """创建时间""")
    val createAt = mongoColumnJoin(this.parentPropertyName, "createAt")
    /**
     * 更新时间
     */
    @nbcp.base.db.annotation.Cn(value = """更新时间""")
    val updateAt = mongoColumnJoin(this.parentPropertyName, "updateAt")
    override fun toString(): String {
        return mongoColumnJoin(this.parentPropertyName).toString()
    }
}

